package com.bitoon.basketdudes.web;

import com.opensymphony.xwork2.ActionSupport;

public class Buscador extends BaseAction {

    private String donde;
    private String url;

    public String execute() {
        return SUCCESS;
    }

    public String buscar() {

        if (donde.equalsIgnoreCase("managers")) {
            setUrl("/competition/search/managers");
        } else if (donde.equalsIgnoreCase("equipos")) {
            setUrl("/competition/search/teams");
        } else if (donde.equalsIgnoreCase("networks")) {
            setUrl("/competition/search/networks");
        }

        return SUCCESS;
    }

    public String getDonde() {
        return donde;
    }

    public void setDonde(String donde) {
        this.donde = donde;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

}
